package com.sprucetec.live.common.dto.business;

import com.sprucetec.live.entity.*;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * @author chenkai
 * @date 2020/3/31 4:28 下午
 * @description:
 */
@Data
public class LiveVideoDto extends LiveVideo {

    private Integer pageSize;

    private Integer pageIndex;

    private List<Long> anchorIdList;

    private List<Integer> typeList;

    private List<Long> categoryIdList;

    private VideoSetting videoSetting;

    private String operateType; // 操作类型

    private String searchKeywords; // 搜索关键字
    private String isMasterServer; // 是否主服务器

    /***直播详情页使用****/
    private String uid; // 视频观看人工号
    private String username; // 视频观看人姓名
    private String liveServer;// 直播地址
    private String liveHlsAddress; // 视频hls 地址拼接
    private String liveHlsType; // 视频hls码率拼接'
    private String isAdvance; // 是否预告
    private String onlineUserNum;// 视频在线人数
    private String videoId;
    private Boolean isDetail; // 是否详情页查询
    private String ip;// 用户IP
    private String isIntranet;
    private String city; // 用户所在城市
    /***直播详情页使用****/

    /**
     * 视频HLS集合
     */
    private List<LiveVideoHlsDetail> videoHlsDetailList;

    /**
     * 视频服务器集合
     */
    private List<LiveVideoServerDetail> videoServerDetailList;

    /**
     * 视频关联集合
     */
    private List<LiveVideoRelateDetail> videoRelateDetailList;

    /**
     * 分类名称
     */
    private String categoryName;

    /**
     * 主播名称
     */
    private String anchorName;

    public void judgePage() {
        if (pageIndex == null) {
            this.setPageIndex(1);
        }
        if (pageSize == null) {
            this.setPageSize(10);
        }
    }


    @Data
    public class VideoSetting implements Serializable {
        private static final long serialVersionUID = -7729039615209053032L;
        private Integer isTop;
        private Integer isCarousel;
        private Integer liveStatus;
        private Integer isDeleted;
        private Integer isShelves;
    }


}
